package com.gopay.common.domain.log;

import com.gopay.common.domain.BaseEntity;

import javax.persistence.*;
import java.util.Date;

/**
 * 操作日志记录表
 *
 * @OperLogDtl.java
 * @author sh.jiao
 * @2017年5月9日 上午11:08:01 www.gopay.com.cn Inc.All rights reserved.
 */

@Entity
@Table(name="T_OPER_LOG_DTL")
public class OperLogDtl extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 主键 **/
    private Long logId;
    /** 线程号 **/
    private String threadId;
    /** 操作后快照 **/
    private String snapshotAfter;
    /** 操作前快照 **/
    private String snapshotBefore;
    /** 状态 **/
    private String status;
    /** 系统平台 **/
    private String platform;
    /** 目录 **/
    private String category;
    /**模块**/
    private String modules;
    /** 操作时间 **/
    private Date operTs;
    /** 本地IP **/
    private String localIp;
    /** 客户端IP **/
    private String remoteIp;
    /** 备注（异常或自定义提示） **/
    private String remark;
    /** 操作类型号 **/
    private String operTypeCd;
    /** 操作详情 **/
    private String operDesc;
    /** 步骤号 **/
    private String stepCode;
    /** 步骤名称 **/
    private String stepName;
    /** 发起人客户ID **/
    private String launchCustId;
    /** 发起人客户名称**/
    private String launchCustName;
    /** 发起人用户ID **/
    private String launchUserId;
    /** 发起人用户名称 **/
    private String launchUserName;
    /** 目标人客户ID **/
    private String targetCustId;
    /** 目标人客户名称 **/
    private String targetCustName;
    /** 目标人用户ID **/
    private String targetUserId;
    /** 目标人用户名称 **/
    private String targetUserName;
    /** 订单号 **/
    private String orderId;
    /** 操作员号 **/
    private String operId;
    /** 密码控件表ID **/
    private Long pwdCtrlAttrInfoId;

    private OperLogAssistDtl assistDtl;

    private OperLogBankRouteDtl bankRouteDtl;

    @Id
    @SequenceGenerator(name = "SQ_T_OPER_LOG_DTL", sequenceName = "SQ_T_OPER_LOG_DTL",initialValue = 1,allocationSize = 1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SQ_T_OPER_LOG_DTL")
    @Column(name = "LOG_ID")
    public Long getLogId() {
        return logId;
    }

    public void setLogId(Long logId) {
        this.logId = logId;
    }

    @Column(name = "THREAD_ID",length = 50)
    public String getThreadId() {
        return threadId;
    }

    public void setThreadId(String threadId) {
        this.threadId = threadId;
    }

    @Lob
    @Column(name = "SNAPSHOT_AFTER",columnDefinition = "CLOB")
    public String getSnapshotAfter() {
        return snapshotAfter;
    }

    public void setSnapshotAfter(String snapshotAfter) {
        this.snapshotAfter = snapshotAfter;
    }

    @Lob
    @Column(name = "SNAPSHOT_BEFORE",columnDefinition = "CLOB")
    public String getSnapshotBefore() {
        return snapshotBefore;
    }

    public void setSnapshotBefore(String snapshotBefore) {
        this.snapshotBefore = snapshotBefore;
    }

    @Column(name = "STATUS",length = 2)
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Column(name = "PLATFORM",length = 2)
    public String getPlatform() {
        return platform;
    }

    public void setPlatform(String platform) {
        this.platform = platform;
    }

    @Column(name = "CATEGORY",length = 2)
    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    @Column(name = "MODULES",length = 2)
    public String getModules() {
        return modules;
    }

    public void setModules(String modules) {
        this.modules = modules;
    }

    @Column(name = "OPER_TS")
    public Date getOperTs() {
        return operTs;
    }

    public void setOperTs(Date operTs) {
        this.operTs = operTs;
    }

    @Column(name = "LOCAL_IP",length = 20)
    public String getLocalIp() {
        return localIp;
    }

    public void setLocalIp(String localIp) {
        this.localIp = localIp;
    }

    @Column(name = "REMOTE_IP",length = 20)
    public String getRemoteIp() {
        return remoteIp;
    }

    public void setRemoteIp(String remoteIp) {
        this.remoteIp = remoteIp;
    }

    @Column(name = "REMARK",length = 3000)
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Column(name = "OPER_TYPE_CD",length = 8)
    public String getOperTypeCd() {
        return operTypeCd;
    }

    public void setOperTypeCd(String operTypeCd) {
        this.operTypeCd = operTypeCd;
    }

    @Column(name = "OPER_DESC",length = 5000)
    public String getOperDesc() {
        return operDesc;
    }

    public void setOperDesc(String operDesc) {
        this.operDesc = operDesc;
    }

    @Column(name = "STEP_CODE",length = 2)
    public String getStepCode() {
        return stepCode;
    }

    public void setStepCode(String stepCode) {
        this.stepCode = stepCode;
    }

    @Column(name = "STEP_NAME",length = 50)
    public String getStepName() {
        return stepName;
    }

    public void setStepName(String stepName) {
        this.stepName = stepName;
    }

    @Column(name = "LAUNCH_CUST_ID",length = 100)
    public String getLaunchCustId() {
        return launchCustId;
    }

    public void setLaunchCustId(String launchCustId) {
        this.launchCustId = launchCustId;
    }

    @Column(name = "LAUNCH_CUST_NAME",length = 300)
    public String getLaunchCustName() {
        return launchCustName;
    }

    public void setLaunchCustName(String launchCustName) {
        this.launchCustName = launchCustName;
    }

    @Column(name = "LAUNCH_USERID",length = 100)
    public String getLaunchUserId() {
        return launchUserId;
    }

    public void setLaunchUserId(String launchUserId) {
        this.launchUserId = launchUserId;
    }

    @Column(name = "LAUNCH_USER_NAME",length = 300)
    public String getLaunchUserName() {
        return launchUserName;
    }

    public void setLaunchUserName(String launchUserName) {
        this.launchUserName = launchUserName;
    }

    @Column(name = "TARGET_CUST_ID",length = 100)
    public String getTargetCustId() {
        return targetCustId;
    }

    public void setTargetCustId(String targetCustId) {
        this.targetCustId = targetCustId;
    }

    @Column(name = "TARGET_CUST_NAME",length = 300)
    public String getTargetCustName() {
        return targetCustName;
    }

    public void setTargetCustName(String targetCustName) {
        this.targetCustName = targetCustName;
    }

    @Column(name = "TARGET_USER_ID",length = 100)
    public String getTargetUserId() {
        return targetUserId;
    }

    public void setTargetUserId(String targetUserId) {
        this.targetUserId = targetUserId;
    }

    @Column(name = "TARGET_USER_NAME",length = 300)
    public String getTargetUserName() {
        return targetUserName;
    }

    public void setTargetUserName(String targetUserName) {
        this.targetUserName = targetUserName;
    }

    @Column(name = "ORDER_ID",length = 100)
    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    @Column(name = "OPER_ID", length = 100)
    public String getOperId() {
        return operId;
    }

    public void setOperId(String operId) {
        this.operId = operId;
    }

    @Transient
    public OperLogAssistDtl getAssistDtl() {
        return assistDtl;
    }

    public void setAssistDtl(OperLogAssistDtl assistDtl) {
        this.assistDtl = assistDtl;
    }

    @Transient
    public OperLogBankRouteDtl getBankRouteDtl() {
        return bankRouteDtl;
    }

    public void setBankRouteDtl(OperLogBankRouteDtl bankRouteDtl) {
        this.bankRouteDtl = bankRouteDtl;
    }

    @Column(name = "PWD_CTRL_ATTR_INFO_ID")
    public Long getPwdCtrlAttrInfoId() {
        return pwdCtrlAttrInfoId;
    }

    public void setPwdCtrlAttrInfoId(Long pwdCtrlAttrInfoId) {
        this.pwdCtrlAttrInfoId = pwdCtrlAttrInfoId;
    }
}
